import React from 'react'
import {Icon} from 'antd'
import classNames from 'classnames'
import styles from './index.less'

const customIcon = [
  'xitongguanli1',
  'caidan',
  'cangkux',
  'iconx',
  'daojuguanliiconx'
]

export default (props) => {
  const {type, style, className} = props
  if (customIcon.includes(type)) {
    return (
      <svg style={style} className={classNames('anticon', styles.icon, className)} aria-hidden="true">
        <use xlinkHref={`#icon-${type}`} />
      </svg>
    )
  }
  return (
    <Icon {...props} />
  )
}
